package cn.xianshu.org.service.impl;

import cn.xianshu.basic.query.BasicQuery;
import cn.xianshu.basic.service.impl.BasicServiceImpl;
import cn.xianshu.basic.util.PageList;
import cn.xianshu.org.domain.SystemsDetail;
import cn.xianshu.org.mapper.SystemsDetailMapper;
import cn.xianshu.org.mapper.SystemsTypeMapper;
import cn.xianshu.org.query.SystemsDetailQuery;
import cn.xianshu.org.service.ISystemsDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
//@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public class SystemsDetailServiceImpl extends BasicServiceImpl<SystemsDetail> implements ISystemsDetailService {
    @Autowired
    private SystemsDetailMapper systemsDetailMapper;


   /* @Override
    public Employee findOne(Long id) {
        return employeeMapper.loadOne(id);
    }

    @Override
    public List<Employee> findAll() {
        return employeeMapper.loadAll();
    }

    @Override
    @Transactional
    public void delete(Long id) {
        employeeMapper.remove(id);
    }



    @Override
    @Transactional
    public void update(Employee employee) {
        employeeMapper.update(employee);
    }



    @Override
    public void Bydelete(List<Long> ids) {
        employeeMapper.Bydelete(ids);
    }*/



    /*@Override
    @Transactional
    public void insert(SystemsDetail systemsDetail, Long id) {
        systemsTypeMapper.loadById(id);
        systemsDetailMapper.insert(systemsDetail);

    }*/
   @Override
   public PageList<SystemsDetail> pageQuery(SystemsDetailQuery query) {
       // 总条数
       Integer total = systemsDetailMapper.count(query);
       // 每页显示数据
       List<SystemsDetail> rows = systemsDetailMapper.queryData(query);
       return new PageList<>(total, rows);
   }
    @Override
    public List<SystemsDetail> queryTree() {
        return systemsDetailMapper.queryTree();
    }


    @Override
    public PageList<SystemsDetail> queryList(BasicQuery query) {
        return null;
    }
}
